from selenium.webdriver.common.by import By

class UserEIPLocator:

    #第一行的instance id
    first_instance_id = (By.XPATH, '(//td[contains(@class,"antd4-table-cell")])[16]')
    # actions按钮
    actions_button = (By.XPATH, '(//div[contains(@class,"antd4-dropdown-trigger table-operation-omit")])[1]')
    # release按钮
    release_button = (By.XPATH, '(//span[contains(@class,"antd4-dropdown-menu-title-content")])[2]')
    # release界面释放按钮
    real_release_button = (By.CSS_SELECTOR, '[class="antd4-btn antd4-btn-primary antd4-btn-lg releaseBtn___27j7c"]')
    # 确认删除按钮
    confirm_release_button = (By.XPATH, '//span[text() = "Yes, release"]')
    # 释放成功提示语
    release_success = (By.XPATH, '(//span[contains(@class,"resultTitle___2AfnO")])[1]')

    #按量付费选项
    pag_button = (By.XPATH, '//span[text() = "Pay-As-You-Go"]')
    #按量付费——流量计费
    pay_by_traffic = (By.XPATH, '//span[text() = "Pay by Traffic"]')

    # modify按钮
    modify_button = (By.XPATH, '//span[text() = "Modify"]')

    #1000Mbs
    new_bandwidth = (By.XPATH, '(//div[contains(@class,"antd4-slider-rail")])[1]')
    # check order 按钮
    check_order_button = (By.XPATH, '//span[text() = "Check Order"]')

    #续费按钮
    renew_button = (By.XPATH, '//span[text() = "Renew"]')
    #续费界面新的过期时间
    new_expiration_date = (By.XPATH, '(//span[contains(@class,"newExpirationDate___3OiQT")])[1]')
    #列表过期时间
    new_expired_time = (By.XPATH, '(//td[contains(@class,"antd4-table-cell")])[22]')

    # 切换组织按钮
    modify_organization_button = (By.XPATH, '//span[text() = "Change Organization"]')
    # change organization选择框
    change_organization_select = (By.XPATH, '(//div[contains(@class,"antd4-select-selector")])[4]')
    # chang organization下拉选择
    change_organization_first_select = (By.XPATH,'(//span[contains(@class,"antd4-select-tree-node-content-wrapper antd4-select-tree-node-content-wrapper-open")])[1]')
    change_organization_second_select = (By.XPATH,'(//span[contains(@class,"antd4-select-tree-node-content-wrapper antd4-select-tree-node-content-wrapper-normal")])[1]')
    # submit按钮
    submit_button = (By.XPATH, '//span[text() = "Submit"]')
    # 列表organization字段
    organization = (By.XPATH, '(//div[contains(@class,"cre-table-nowrap")])[4]')

    # change billing method按钮1
    change_billing_method_button = (By.XPATH, '(//span[contains(@class,"anticon anticon-edit editIcon___3kg65")])[1]')

    #eip_organization
    eip_organization=(By.XPATH,'//form[@id="creForm"]/div[1]/div[2]/div[3]//div[@class="antd4-select-selector"]/span[2]')


    #eip_id
    eip_id=(By.XPATH,'//tr[@class="next-table-row first last"]/td[2]//a/div')

    #orders界面创建时间筛选按钮
    orders_create_time_filter = (By.XPATH, '(//div[contains(@class,"antd4-table-column-sorters")])[1]')

    #查看订单详情按钮
    view_orders_detail = (By.XPATH, '(//button[contains(@class,"antd4-btn antd4-btn-link table-operation-btnLine-btn")])[1]')

    #订单详情页面下载按钮
    orders_detail_download = (By.XPATH, '//span[text() = "Download"]')

    #新增带宽字段
    maximum_bandwidth = (By.XPATH, '(//div[contains(@class,"antd4-col antd4-form-item-label antd4-form-item-label-left")])[3]')

    #spending summary菜单
    spending_summary_menu = (By.XPATH, '(//div[contains(@class,"cre-menu-layer-2")])[1]')
    #spending summary详情页签
    spending_summary_details_tab = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[2]')
    # 详情页签的instance id输入框
    instance_id = (By.ID, 'instanceId')
    #详情页签搜索按钮


    #计费转换的amount
    pay_amount = (By.XPATH, '(//span[contains(@class,"orderCostsMoney___1vNd2")])[1]')

    # 按量付费界面expired time字段
    expired_time = (By.XPATH, '//div[text() = "Expired Time"]')







